package com.tiantianfresh.view.service.impl;

import com.tiantianfresh.model.dao.UserMapper;
import com.tiantianfresh.model.pojo.User;
import com.tiantianfresh.view.service.RegisterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author FANGAO
 * @date 2021/11/28 - 下午 14:59
 */
@Service
public class RegisterServiceImpl implements RegisterService{

    @Resource
    private UserMapper userMapper;

    @Override
    public boolean insert(User user) {
        if (userMapper.insert(user)>0)return true;
        return false;
    }

    @Override
    public boolean selectLoginacct(String loginacct) {
        if(userMapper.selectLoginacct(loginacct)>0)return true;
        return false;
    }

    @Override
    public boolean selectEmail(String email) {
        if(userMapper.selectEmail(email)>0)return true;
        return false;
    }

}
